package com.yqd.lesson.actor.serven

import akka.actor.{Actor, ActorLogging, Props}

object Receiver {
  def props: Props = Props[Receiver]
}

class Receiver extends Actor with ActorLogging {
  import Receiver._

  def receive = {
    case msg:String =>
      Thread.sleep(1000 * 5)
      log.info(s"${sender().path} say: $msg")
  }
}
